<?php $idSet = I('get.');unset($idSet['_pjax']);unset($idSet['_']);?>
<?php $mark = md5(CONTROLLER_NAME.ACTION_NAME.md5(serialize($idSet)).(++$GLOBLAS['_data_table_counter_']));?>
<?php $boxId = 'datatable-box-'.$mark;?>
<?php $tableId = 'datatable-table-'.$mark;?>
<div class="row">
    <div class="col-xs-12">
        <div class="box flat box-primary">
            <div class="box-body aaaaaa" id="{$boxId}">
                <div class="dataTables_tool clearfix">
                    <?php foreach($list_btn as $label=>$btn):?>
                    <button class="btn btn-flat _dt_btns_ btn-{:$btn['class']?:'default'}" href="{$btn[url]}" data-href="{$btn[url]}" data-callback="{$btn['callback']}" data-param="{$btn['param']}">
                        <i class="fa fa-{$btn['icon']}"></i>
                        {$label}
                    </button>
                    <?php endforeach;?>
                    <div class="pull-right">
                        <a class="btn btn-success btn-flat btn-save hide">保存</a>
                        <a class="btn btn-default btn-flat btn-filter">搜索</a>
                        <div class="btn-group  btn-set">
                            <button type="button" class="btn btn-default btn-flat dropdown-toggle" data-toggle="dropdown">
                              设置 <span class="caret"></span>
                            </button>
                            <ul class="dropdown-menu flat" role="menu" style="right:0;left:initial;"> </ul>
                        </div>
                        <!--<a href="javascript:void(0)" class="btn btn-success btn-flat btn-sm btn-export">导出</a>-->
                    </div>
                </div>

                <style>table{min-width:100% !important;}</style>
                <div class="table-wrap">
                    <table id="{$tableId}" class="table table-bordered table-hover table-condensed table-nowrap table-opacity" data-table-name="{$tableId}">
                        <thead>
                            <tr>
                                <th class="cell_checkbox"><input class="checkbox check-all" type="checkbox"></th>
                                <volist name="list_grids" id="field">
                                    <th data-id='{$field["field"][0]}' data-type='{$field.filter}' data-enum='{$field.enum}' data-width='{$field.width}' style="width:{$field.width}">{$field.title}</th>
                                </volist>
                            </tr>
                        </thead>
                        <tbody>
                            <empty name="list_data">
                                <tr>
                                  <td><span style="line-height:80px;text-align:center;color:#777;">&nbsp;</span></td>
                                </tr>
                            </empty>
                            <volist name="list_data" id="rows">
                                <tr>
                                    <volist name="rows" id="column" key="ckey">
                                        <?php if($ckey==1):?>
                                            <td><input class='ids checkbox' type='checkbox'  value={$column} name='ids[]'></td>
                                        <?php else:?>
                                            <td>{$column}</td>
                                        <?php endif;?>
                                    </volist>
                                </tr>
                            </volist>
                        </tbody>
                    </table>
                    <div class="style-table">
                        <div class="table-loading"><div class="loading-text"><span>数据加载中......</span></div></div>
                        <table class="table table-bordered table-condensed table-nowrap" id="table-full" style="opacity:0;filter:alpha(opacity=0)">
                            <thead>
                              <tr>
                                  <volist name="list_grids" id="field">
                                      <th data-id='{$field["field"][0]}' data-type='{$field.filter}' data-enum='{$field.enum}' data-width='{$field.width}' style="width:{$field.width}">{$field.title}</th>
                                  </volist>
                              </tr>
                            </thead>
                            <tbody>
                             <empty name="list_data">
                                 <tr>
                                   <td><span style="line-height:80px;text-align:center;color:#777;">没有数据</span></td>
                                 </tr>
                              </empty>

                              <volist name="list_data" id="rows">
                                  <tr>
                                      <volist name="rows" id="column" key="ckey">
                                        <?php if($ckey==1):?>
                                            <td><span><input class='ids checkbox' type='checkbox'  value={$column} name='ids[]'></span></td>
                                        <?php else:?>
                                            <td><span>{$column}</span></td>
                                        <?php endif;?>
                                      </volist>
                                  </tr>
                              </volist>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    var list_grids=<?php echo json_encode($list_grids);?>;
    var first_page_data=<?php echo json_encode($list_data);?>;
    initDatatable({ 'boxId':'{$boxId}','tableId':'{$tableId}'},list_grids,first_page_data);
</script>
